<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 100天前是几月几号
        // 获取当前的时间戳
        var timer = Date.now();
        // 计算100天之前的时间戳
        timer = timer - 100 * 24 * 3600 * 1000;
        var d = new Date(timer);
        console.log(d);
    </script>
</body>

</html>